<script src="./script.js"></script>
<style src="./style.css"></style>
<template>
  <div class="app-container">
    <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px"
             label-position="left">
      <el-form-item label="直播间ID" prop="live_id">
        <el-input v-model="formData.live_id"
                  placeholder="请输入在小程序直播间创建的直播间ID"
                  clearable :style="{width: '100%'}">
        </el-input>
      </el-form-item>
      <el-form-item label="生效时间" prop="field104">
        <el-date-picker type="datetimerange" v-model="formData.time_range" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
                        :style="{width: '100%'}" start-placeholder="开始时间" end-placeholder="结束时间" range-separator="至"
                        clearable></el-date-picker>
      </el-form-item>
      <el-form-item label="上传弹窗图片" prop="cover">
        <el-upload ref="upload"
                   :http-request="handleUploadPic"
                   :on-remove="onRemovePic"
                   :file-list="fileList"
                   action="#"
                   list-type="picture"
                   :limit="1"
                   accept="image/*">
          <el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
          <div slot="tip" class="el-upload__tip">只能上传不超过4MB 的image/*文件</div>
        </el-upload>
      </el-form-item>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>


